// config.js
import dotenv from "dotenv"; //环境变量依赖 参考：https://juejin.cn/post/6844904198929121288?from=search-suggest
import { join } from 'node:path'
const mode = process.env.NODE_ENV 
console.log("mode=", mode)
const PACKAGE_ROOT = __dirname
// 项目目录（根目录，
const PROJECT_ROOT = join(PACKAGE_ROOT, '../../../..')
dotenv.config({ path: [join(PROJECT_ROOT, '.env'), join(PROJECT_ROOT, `.env.${mode}`), join(PROJECT_ROOT, '.env.local')] });
const { VITE_SERVER_PORT } = process.env;
export default { SERVER_PORT: VITE_SERVER_PORT }
